// Copyright DustedPixels.com 2008. All rights reserved.

package com.dustedpixels.dcel;

import java.util.List;

/**
 * @author micapolos@gmail.com (Michal Pociecha-Los)
 */
public interface Unit {
  /**
   * Returns package name, or null if no package is specified.
   */
  String getPackageName();
  
  /**
   * Returns name of this unit.
   */
  String getName();
  
  /**
   * Returns a list of pins in this unit keyed by its name.
   */
  List<Pin> getPins();
  
  /**
   * @return
   */
  List<Component> getComponents();
  
  List<Jumper> getJumpers();
  
  List<String> getScript();
    
  interface Pin {
    /**
     * Returns name of this pin.
     */
    String getName();
    
    /**
     * Returns width of this pin (max: 32).
     */
    int getWidth();
  }
  
  interface Component {
    String getName();
    String getUnitName();
    List<Integer> getInitArgs();
  }
  
  interface Jumper {
    String getComponent1Name();
    String getPin1Name();
    String getComponent2Name();
    String getPin2Name();
  }
}
